*------------------------------------------TRUST AND COMPETENCE EVALAUTIONS ANES --------------------------------------------------------------*

********************************************************MAIN ANALYSES***************************************************************************

***** Excludes data that does not contain simultaneous trait ratings of power and warmth of presidential candidates
drop if VCF0004 <= 1978
drop if VCF0004 == 1982
drop if VCF0004 == 1986
drop if VCF0004 == 1990
drop if VCF0004 == 1994
drop if VCF0004 == 1998
drop if VCF0004 == 2002
drop if VCF0004 == 2012


**************************************************RECODES DIFFERENT VARIABLES**************************************************************
*****Respondents' ideological self-placement on 7-point scale (1 = Extremely liberal; 7 = Extremely conservative)
recode VCF0803 (0 9 =.), generate(libcons7)
generate ideology = (libcons7-1)/6


*****Trait perceptions of political candidates - coded to 0-1 scales with "0" and "1" constituting min. and max vaklues, respectively. 
*Republican candidates are coded "1" and Democrats are coded "2"
// Categories for trait variables:
*1. Extremely well
*2. Quite well
*3. Not too well
*4. Not well at all

*Missing codes:
*8: DK
*9: NA
*0:

*** Trait: Strong leadership
recode VCF0368 (1=4) (2=3) (3=2) (4=1) (0 = .) (8 =.) (9 =.), generate(lead1)
recode VCF0356 (1=4) (2=3) (3=2) (4=1) (0 = .) (8 =.) (9 =.), generate(lead2)
**0-1 variables
generate Leadership1 = (lead1-1)/3
generate Leadership2 = (lead2-1)/3


*** Trait: 'Really cares about people like you'
recode VCF0369 (1=4) (2=3) (3=2) (4=1) (0 = .) (8 =.) (9 =.), generate(care1)
recode VCF0357 (1=4) (2=3) (3=2) (4=1) (0 = .) (8 =.) (9 =.), generate(care2)
**0-1 variables
generate Care1 = (care1-1)/3
generate Care2 = (care2-1)/3


*** Trait: Compassion
recode VCF0363 (1=4) (2=3) (3=2) (4=1) (0 = .) (8 =.) (9 =.), generate(comp1)
recode VCF0351 (1=4) (2=3) (3=2) (4=1) (0 = .) (8 =.) (9 =.), generate(comp2)
**0-1 variables
generate Comp1 = (comp1-1)/3
generate Comp2 = (comp2-1)/3


*** Trait: Moral
recode VCF0367 (1=4) (2=3) (3=2) (4=1) (0 = .) (8 =.) (9 =.), generate(moral1)
recode VCF0355 (1=4) (2=3) (3=2) (4=1) (0 = .) (8 =.) (9 =.), generate(moral2)
**0-1 variables
generate Integrity1 = (moral1-1)/3
generate Integrity2 = (moral2-1)/3


*** Trait: Intelligent
recode VCF0362 (1=4) (2=3) (3=2) (4=1) (0 = .) (8 =.) (9 =.), generate(intel1)
recode VCF0350 (1=4) (2=3) (3=2) (4=1) (0 = .) (8 =.) (9 =.), generate(intel2)
**0-1 variables
generate Intel1 = (intel1-1)/3
generate Intel2 = (intel2-1)/3

*** Trait: Decent
recode VCF0364 (1=4) (2=3) (3=2) (4=1) (0 = .) (8 =.) (9 =.), generate(decent1)
recode VCF0352 (1=4) (2=3) (3=2) (4=1) (0 = .) (8 =.) (9 =.), generate(decent2)
**0-1 variables
generate Decent1 = (decent1-1)/3
generate Decent2 = (decent2-1)/3

*** Trait: Inspiring
recode VCF0365 (1=4) (2=3) (3=2) (4=1) (0 = .) (8 =.) (9 =.), generate(inspir1)
recode VCF0353 (1=4) (2=3) (3=2) (4=1) (0 = .) (8 =.) (9 =.), generate(inspir2)
**0-1 variables
generate Inspiration1 = (inspir1-1)/3
generate Inspiration2 = (inspir2-1)/3

*** Trait: Knowledgeable
recode VCF0366 (1=4) (2=3) (3=2) (4=1) (0 = .) (8 =.) (9 =.), generate(know1)
recode VCF0354 (1=4) (2=3) (3=2) (4=1) (0 = .) (8 =.) (9 =.), generate(know2)
**0-1 variables
generate Know1 = (know1-1)/3
generate Know2 = (know2-1)/3



*** Creates common WARMTH variable based on 'Really cares about people like you' and Compassion
egen Warmth1 = rowmean(Care1 Comp1)
egen Warmth2 = rowmean(Care2 Comp2)


*** Creates common COMPETENCE variable based on intelligent and knowledgeable
egen Competence1 = rowmean(Intel1 Know1)
egen Competence2 = rowmean(Intel2 Know2)



******* DEPENDENT VARIABLES

****** Vote choice
*VALID_CODES:
*------------
*1. Democrat
*2. Republican
*3. Major third party candidate (Wallace 1968/Anderson 1980/Perot 1992,1996)

** Excludes respondents who did not vote for either the Reublican or the Democratic candiadte (see note 7 in main text)
recode VCF0704 (0 3 =.), generate(vote_choice)

** Voting for Republican candidate:
recode vote_choice (1 = 0) (2=1), generate(vote1)

** Voting for Democratic candidate:
recode vote_choice (1=1) (2 = 0), generate(vote2)



****** Feeling themometers

** Feeling thermometer rating of Republican candidate:
recode VCF0426 (98 =.) (99=.), generate(feel1)

** Feeling thermometer rating of Democratic candidate:
recode VCF0424 (98 =.) (99=.), generate(feel2)

* Creates 0-1 variables ("0" and "1" indicate coldest and warmest feelings, respectively)
generate Feel1 = feel1/100
generate Feel2 = feel2/100




****** BACKGROUND VARIABLES AND CONTROLS
**** Respondents' party identification (7-point scale recoded to 0-1 scale format;
* "0" and "1" represents "Strong Democrats" and "Strong Republicans", respectively.
recode VCF0301  (1 = 1) (2 = 2) (3 = 3) (4 = 4) (5 = 5) (6 =6) (7=7) (else =.), generate(party_7)
generate party7 = (party_7-1)/6


**** Gender: VCF0104
recode VCF0104 (1=1 "male") (2=0 "female") (else =.), generate(gender) label(genderLB)

**** Age: VCF0101
recode VCF0101 (00 97 98 99 = .), generate(age)

**** Income: summary household income - VCF0114 
//coded in percentiles: 0-16; 17-33; 34-67 68-95; 96-100.
recode VCF0114 (1=0) (2=1) (3=2) (4=3) (5=4) (0=.), generate(income)

**** Education: VCF0110
//coded in four categories
recode VCF0110 (1=0) (2=1) (3=2) (4=3) (0=.), generate(education)

**** Race: VCF0106
//coded 1 = white, 0 = nonwhite
recode VCF0106 (1=1) (2 3 = 0) (0 9 =.), generate(race)

**** Church attendance: VCF0130
// coded into five continuous categories
recode VCF0130 (5 7 = 0) (4 = 1) (3 = 2) (2 = 3) (1 = 4) (0 8 9 =.), generate(church)


**** Watched TV about the election: VCF0724
// coded 1 = yes, 0 = no
recode VCF0724 (1=0) (2=1) (else=.), generate(TVwatch)


**** Interest in the election: VCF0310
// coded into three continuous categories: 0 = Not much interested; 1 = Somewhat interested; 2 = Very much interested
recode VCF0310 (1=0) (2=1) (3=2) (else =.), generate(interest)

**--------------------------------------------------Restructuring the dataset-------------------------------------------------------**

***** Creates unique identifier for each respondent 
generate identity = _n


reshape long Leadership Care Comp Integrity Intel Inspiration Decent Know Warmth Competence Feel vote, i(identity) j(cand_party)

***Creates dummy variable for candidate party: 0 = Rep; 1 = Dem
recode cand_party (1=0) (2=1)


***Sets clustering variable
xtset identity

**-------------------------------------------------------------------------------------------------------------------------------------**
* Creates standardized trait variables
egen Competence_std = std(Competence)
egen Warmth_std = std(Warmth)
egen Leadership_std = std(Leadership)
egen Integrity_std = std(Integrity)



*------------------------------------DESCRIPTIVE STATISTICS FOR KEY VARIABLES 1984-2008-------------------------------------------------*

summ Competence Warmth Leadership Integrity

summ Feel

summ ideology

bys VCF0004: summ Competence Warmth Leadership Integrity Care Comp Intel Inspir Decent Know



*****************MAIN ANALYSES: Which trait is the stronger across all available datasets with trait evaluations in the ANES?**************

*** Feeling thermometers: Competence, Warmth, Strong Leader, Integrity
xtreg Feel c.Competence c.Warmth c.Leadership c.Integrity i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

*Graphical illustration: Feeling thermometer ratings (based on model also controlling for partisan effects on candidate evaluations)
xtreg Feel c.Competence c.Warmth c.Leadership c.Integrity i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004, fe

margins, dydx(Competence Warmth Leadership Integrity)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#4) ylabel(0 (0.1) 0.5) ///
xtitle(trait evaluations) ytitle(Marginal effect of traits on feeling thermometer ratings) title("") scheme(s2color)






*** Vote choice: Competence, Warmth, Strong Leader, Integrity
xtlogit vote c.Competence c.Warmth c.Leadership c.Integrity i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

*Graphical illustration: vote choice
xtlogit vote c.Competence c.Warmth c.Leadership c.Integrity i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004, fe

margins, dydx(Competence Warmth Leadership Integrity)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#4) ylabel(0 (0.2) 0.1) ///
xtitle(trait evaluations) ytitle(Marginal effect of traits on vote choice) title("") scheme(s2color)



*------------------------------------------------- SUPPORTING INFORMATION AND ROBUSTNESS ANALYSES --------------------------------------------------------------*

***** S.I.2: Correlations betwen traits categorized as same candidate trait

*Competence:
corr Intel Know if VCF0004 > 1980
alpha Intel Know if VCF0004 > 1980

*Warmth
corr Care Comp if VCF0004 > 1980
alpha Care Comp if VCF0004 > 1980

*Cross-trait correlations for 1984-1992 elections (only elections for which all six specific traits are measured) (For Supporting Information S.I.2)
pwcorr Intel Know Comp Care Leadership Integrity if VCF0004 == 1984 | 1988 | 1992, sig
summ Intel Know Comp Care Leadership Integrity if VCF0004 > 1984 &  VCF0004 < 1996

** Correlations and alpha reliability coefficients between traits coded together when lumping 
* *i) warmth and integrity together, and ii) competence and leadership
*Competence & Leadership:
corr Intel Know Leadership if VCF0004 > 1980
alpha Intel Know Leadership if VCF0004 > 1980

*Warmth
corr Care Comp Integrity if VCF0004 > 1980
alpha Care Comp Integrity if VCF0004 > 1980


******ROBUSTNESS TEST 1: Alternative specifications


***** S.I.3: Analyses with only one trait in the model at a time
**Feeling thermometers
xtreg Feel c.Competence i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004 if VCF0004 > 1980, fe
xtreg Feel c.Warmth i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004 if VCF0004 > 1980, fe
xtreg Feel c.Leadership i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004 if VCF0004 > 1980, fe
xtreg Feel c.Integrity i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004 if VCF0004 > 1980, fe

**Vote choice
xtlogit vote c.Competence i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004 if VCF0004 > 1980, fe
xtlogit vote c.Warmth i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004 if VCF0004 > 1980, fe
xtlogit vote c.Leadership i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004 if VCF0004 > 1980, fe
xtlogit vote c.Integrity i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004 if VCF0004 > 1980, fe



***** S.I.4: Analyses with standardized trait measures
**Feeling thermometer
xtreg Feel c.Competence_std c.Warmth_std c.Leadership_std c.Integrity_std i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

**Vote choice
xtlogit vote c.Competence_std c.Warmth_std c.Leadership_std c.Integrity_std i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity



***** S.I.5: Analyses based on difference scores
* see separate do-file



***** S.I.6: Analyses without controlling for the interaction between party identification and candidate party.
**Feeling thermometers
xtreg Feel c.Competence c.Warmth c.Leadership c.Integrity i.cand_party##ib(2008).VCF0004, fe
*Tests if warmth is a stronger predictor than any of the other traits:
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

**Vote choice
xtlogit vote c.Competence c.Warmth c.Leadership c.Integrity i.cand_party##ib(2008).VCF0004, fe
*Tests if warmth is a stronger predictor than any of the other traits:
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity



******ROBUSTNESS TEST 2: Part-specific and electon-specific models


***** S.I.7: Separate analyses for Republican and Democratic candidates
********FEELING THERMOMETERS
*** Republican candidates:
reg Feel c.Competence c.Warmth c.Leadership c.Integrity c.party7 c.ideology i.gender c.age c.income c.education i.race c.church ib(2008).VCF0004 if cand_party == 0
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

margins, dydx(Competence Warmth Leadership Integrity)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#4) ylabel(0 (0.1) 0.5) ///
xtitle(trait evaluations) ytitle(Marg. effect of traits on feel. therm.) title("") scheme(s2color) ///
name(Republican_feeltherm, replace)


*** Democratic candidates:
reg Feel c.Competence c.Warmth c.Leadership c.Integrity c.party7 c.ideology i.gender c.age c.income c.education i.race c.church ib(2008).VCF0004 if cand_party == 1
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

margins, dydx(Competence Warmth Leadership Integrity)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#4) ylabel(0 (0.1) 0.5) ///
xtitle(trait evaluations) ytitle(Marg. effect of traits on feel. therm.) title("") scheme(s2color) ///
name(Democratic_feeltherm, replace)

graph combine Republican_feeltherm Democratic_feeltherm


********VOTE CHOICE 
*** Republican candidates:
logit vote c.Competence c.Warmth c.Leadership c.Integrity c.party7 c.ideology i.gender c.age c.income c.education i.race c.church ib(2008).VCF0004 if cand_party == 0
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

margins, dydx(Competence Warmth Leadership Integrity)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#4) ylabel(0 (0.1) 0.5) ///
xtitle(trait evaluations) ytitle(Marg. effect of traits on feel. therm.) title("") scheme(s2color) ///
name(Republican_vote, replace)

*** Democratic candidates:
logit vote c.Competence c.Warmth c.Leadership c.Integrity c.party7 c.ideology i.gender c.age c.income c.education i.race c.church ib(2008).VCF0004 if cand_party == 1
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

margins, dydx(Competence Warmth Leadership Integrity)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#4) ylabel(0 (0.1) 0.5) ///
xtitle(trait evaluations) ytitle(Marg. effect of traits on feel. therm.) title("") scheme(s2color) ///
name(Democratic_vote, replace)

graph combine Republican_vote Democratic_vote



***** S.I.8: Election-specific analyses

********FEELING THERMOMETERS

**1980
xtreg Feel c.Competence c.Leadership c.Integrity c.Inspiration i.cand_party##c.party7 if VCF0004 == 1980, fe

*Graphical illustration: Feeling thermometer ratings
margins, dydx(Competence Leadership Integrity Inspiration)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#4) ylabel(0 (0.1) 0.5) ///
xtitle(trait evaluations) ytitle(Marg. effect of traits on feel. therm.) title("") scheme(s2color) ///
name(year1980, replace)

**1984
xtreg Feel c.Competence c.Warmth c.Leadership c.Integrity c.Inspiration c.Decent i.cand_party##c.party7 if VCF0004 == 1984, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

*Graphical illustration: Feeling thermometer ratings
margins, dydx(Competence Warmth Leadership Integrity Inspiration Decent)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#6) ylabel(0 (0.1) 0.5) ///
xtitle(trait evaluations) ytitle(Marg. effect of traits on feel. therm.) title("") scheme(s2color) ///
name(year1984, replace)

**1988
xtreg Feel c.Competence c.Warmth c.Leadership c.Integrity c.Inspiration c.Decent i.cand_party##c.party7 if VCF0004 == 1988, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

*Graphical illustration: Feeling thermometer ratings
margins, dydx(Competence Warmth Leadership Integrity Inspiration Decent)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#6) ylabel(0 (0.1) 0.5) ///
xtitle(trait evaluations) ytitle(Marg. effect of traits on feel. therm.) title("") scheme(s2color) ///
name(year1988, replace)

**1992
xtreg Feel c.Competence c.Warmth c.Leadership c.Integrity c.Inspiration i.cand_party##c.party7 if VCF0004 == 1992, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

*Graphical illustration: Feeling thermometer ratings
margins, dydx(Competence Warmth Leadership Integrity Inspiration)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#5) ylabel(0 (0.1) 0.5) ///
xtitle(trait evaluations) ytitle(Marg. effect of traits on feel. therm.) title("") scheme(s2color) ///
name(year1992, replace)

**1996
xtreg Feel c.Competence c.Warmth c.Leadership c.Integrity c.Inspiration i.cand_party##c.party7 if VCF0004 == 1996, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

*Graphical illustration: Feeling thermometer ratings
margins, dydx(Competence Warmth Leadership Integrity Inspiration)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#5) ylabel(0 (0.1) 0.5) ///
xtitle(trait evaluations) ytitle(Marg. effect of traits on feel. therm.) title("") scheme(s2color) ///
name(year1996, replace)

**2000
xtreg Feel c.Competence c.Warmth c.Leadership c.Integrity i.cand_party##c.party7 if VCF0004 == 2000, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

*Graphical illustration: Feeling thermometer ratings
margins, dydx(Competence Warmth Leadership Integrity)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#4) ylabel(0 (0.1) 0.5) ///
xtitle(trait evaluations) ytitle(Marg. effect of traits on feel. therm.) title("") scheme(s2color) ///
name(year2000, replace)

**2004
xtreg Feel c.Competence c.Warmth c.Leadership c.Integrity i.cand_party##c.party7 if VCF0004 == 2004, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

*Graphical illustration: Feeling thermometer ratings
margins, dydx(Competence Warmth Leadership Integrity)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#4) ylabel(0 (0.1) 0.5) ///
xtitle(trait evaluations) ytitle(Marg. effect of traits on feel. therm.) title("") scheme(s2color) ///
name(year2004, replace)

**2008
xtreg Feel c.Competence c.Warmth c.Leadership c.Integrity i.cand_party##c.party7 if VCF0004 == 2008, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

*Graphical illustration: Feeling thermometer ratings
margins, dydx(Competence Warmth Leadership Integrity)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#4) ylabel(0 (0.1) 0.5) ///
xtitle(trait evaluations) ytitle(Marg. effect of traits on feel. therm.) title("") scheme(s2color) ///
name(year2008, replace)

***Common graph
graph combine year1980 year1984 year1988 year1992 year1996 year2000 year2004 year2008

********VOTE CHOICE

**1980
xtlogit vote c.Competence c.Leadership c.Integrity c.Inspiration i.cand_party##c.party7 if VCF0004 == 1980, fe

*Graphical illustration: vote choice
margins, dydx(Competence Leadership Integrity Inspiration)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#4) ylabel(0 (0.05) 0.2) ///
xtitle(trait evaluations) ytitle(Marginal effect of traits on vote choice) title("") scheme(s2color) ///
name(vote_year1980, replace)

**1984
xtlogit vote c.Competence c.Warmth c.Leadership c.Integrity c.Inspiration c.Decent i.cand_party##c.party7 if VCF0004 == 1984, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

*Graphical illustration: vote choice
margins, dydx(Competence Warmth Leadership Integrity Inspiration Decent)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#6) ylabel(0 (0.05) 0.2) ///
xtitle(trait evaluations) ytitle(Marginal effect of traits on vote choice) title("") scheme(s2color) ///
name(vote_year1984, replace)

**1988
xtlogit vote c.Competence c.Warmth c.Leadership c.Integrity c.Inspir c.Decent i.cand_party##c.party7 if VCF0004 == 1988, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

*Graphical illustration: vote choice
margins, dydx(Competence Warmth Leadership Integrity Inspiration Decent)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#6) ylabel(0 (0.05) 0.2) ///
xtitle(trait evaluations) ytitle(Marginal effect of traits on vote choice) title("") scheme(s2color) ///
name(vote_year1988, replace)

**1992
xtlogit vote c.Competence c.Warmth c.Leadership c.Integrity c.Inspir i.cand_party##c.party7 if VCF0004 == 1992, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

*Graphical illustration: vote choice
margins, dydx(Competence Warmth Leadership Integrity Inspiration)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#5) ylabel(0 (0.05) 0.2) ///
xtitle(trait evaluations) ytitle(Marginal effect of traits on vote choice) title("") scheme(s2color) ///
name(vote_year1992, replace)

**1996
xtlogit vote c.Competence c.Warmth c.Leadership c.Integrity c.Inspir i.cand_party##c.party7 if VCF0004 == 1996, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

*Graphical illustration: vote choice
margins, dydx(Competence Warmth Leadership Integrity Inspiration)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#5) ylabel(0 (0.05) 0.2) ///
xtitle(trait evaluations) ytitle(Marginal effect of traits on vote choice) title("") scheme(s2color) ///
name(vote_year1996, replace)

**2000
xtlogit vote c.Competence c.Warmth c.Leadership c.Integrity i.cand_party##c.party7 if VCF0004 == 2000, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

*Graphical illustration: vote choice
margins, dydx(Competence Warmth Leadership Integrity)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#4) ylabel(0 (0.05) 0.2) ///
xtitle(trait evaluations) ytitle(Marginal effect of traits on vote choice) title("") scheme(s2color) ///
name(vote_year2000, replace)

**2004
xtlogit vote c.Competence c.Warmth c.Leadership c.Integrity i.cand_party##c.party7 if VCF0004 == 2004, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

*Graphical illustration: vote choice
margins, dydx(Competence Warmth Leadership Integrity)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#4) ylabel(0 (0.05) 0.2) ///
xtitle(trait evaluations) ytitle(Marginal effect of traits on vote choice) title("") scheme(s2color) ///
name(vote_year2004, replace)

**2008
xtlogit vote c.Competence c.Warmth c.Leadership c.Integrity i.cand_party##c.party7 if VCF0004 == 2008, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

*Graphical illustration: vote choice
margins, dydx(Competence Warmth Leadership Integrity)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#4) ylabel(0 (0.05) 0.2) ///
xtitle(trait evaluations) ytitle(Marginal effect of traits on vote choice) title("") scheme(s2color) ///
name(vote_year2008, replace)

***Common graph
graph combine vote_year1980 vote_year1984 vote_year1988 vote_year1992 vote_year1996 vote_year2000 vote_year2004 vote_year2008



******ROBUSTNESS TEST 3: Alternative categorizations of trait ratings

***** S.I.9: Analyses based on two trait dimensions

**Below we create a common measure for leadership and competence as the average of the two measures used in the main analyses.

**Creates common variables for i) leadership and competence; ii) warmth and integrity ///
* based on the three single item measures constituting the traiot dimensions in the main analyses.
egen Comp_Lead = rowmean(Know Intel Leadership)
summ Comp_Lead
tab Comp_Lead

egen Warmth_Integ = rowmean(Comp Care Integrity)
summ Warmth_Integ
tab Warmth_Integ

***Feeling thermometer analyses with combined measure for competence and leadership
xtreg Feel c.Comp_Lead c.Warmth_Integ i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004, fe
test Warmth_Integ = Comp_Lead

*Graphical illustration: feeling thermometers
xtreg Feel c.Comp_Lead c.Warmth_Integ i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004, fe

margins, dydx(Comp_Lead Warmth_Integ)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#2) ylabel(0 (0.1) 0.5) ///
xtitle(trait evaluations) ytitle(Marginal effect of traits on feeling thermometer) title("") scheme(s2color) ///
name(two_dimensions_feeltherm, replace)


***Vote choice analyses with combined measure for competence and leadership
xtlogit vote c.Comp_Lead c.Warmth_Integ i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004, fe
test Warmth_Integ = Comp_Lead


*Graphical illustration: vote choice
xtlogit vote c.Comp_Lead c.Warmth_Integ i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004, fe

margins, dydx(Comp_Lead Warmth_Integ)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#2) ylabel(0 (0.1) 0.3) ///
xtitle(trait evaluations) ytitle(Marginal effect of traits on vote choice) title("") scheme(s2color) ///
name(two_dimensions_votechoice, replace)


**Common graph for feeling therm. and vote choice analyses for the alternative two dimensional categorization of traits
graph combine two_dimensions_feeltherm two_dimensions_votechoice




******ROBUSTNESS TEST 4: Only independents

***** S.I.10: Restricting sample to non-partisan respondents

*Creates dichotomous measure for being independent or only leaning versus being weakly or strongly identified as Rep or Dem
recode party_7 (1 2 6 7 = 1) (3 4 5 = 0), generate(partisan)

*** Results for independents & independent-leaning:

*Feeling thermometer
xtreg Feel c.Competence c.Warmth c.Leadership c.Integrity i.cand_party##ib(2008).VCF0004 if partisan ==0, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

margins, dydx(Competence Warmth Leadership Integrity)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#4) ylabel(0 (0.1) 0.5) ///
xtitle(trait evaluations) ytitle(Marginal effect of cand. traits on feeling therm. ratings) title("") scheme(s2color) ///
name(independents_feeling, replace)


***Vote choice
xtlogit vote c.Competence c.Warmth c.Leadership c.Integrity i.cand_party##ib(2008).VCF0004 if partisan ==0, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

margins, dydx(Competence Warmth Leadership Integrity)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#4) ylabel(0 (0.1) 0.3) ///
xtitle(trait evaluations) ytitle(Marginal effect of traits on vote choice) title("") scheme(s2color) ///
name(independents_votechoice, replace)

graph combine independents_feeling independents_votechoice


*** Results for TRUE INDEPENDENTS:

*Feeling thermometer
xtreg Feel c.Competence c.Warmth c.Leadership c.Integrity i.cand_party##ib(2008).VCF0004 if party_7 ==4, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

margins, dydx(Competence Warmth Leadership Integrity)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#4) ylabel(0 (0.1) 0.5) ///
xtitle(trait evaluations) ytitle(Marginal effect of cand. traits on feeling therm. ratings) title("") scheme(s2color) ///
name(TRUE_independents_feeling, replace)


***Vote choice
xtlogit vote c.Competence c.Warmth c.Leadership c.Integrity i.cand_party##ib(2008).VCF0004 if party_7 ==4, fe
test Warmth = Competence
test Warmth = Leadership
test Warmth = Integrity

margins, dydx(Competence Warmth Leadership Integrity)  level(95) noestimcheck 
marginsplot, recastci(rcap) ciopts(lpattern(dash)) recast(bar) yline(0) xlabel(#4) ylabel(0 (0.1) 0.3) ///
xtitle(trait evaluations) ytitle(Marginal effect of traits on vote choice) title("") scheme(s2color) ///
name(TRUE_independents_votechoice, replace)

graph combine TRUE_independents_feeling TRUE_independents_votechoice



***** S.I.11: Moderations by different sophistication measures - respondent education, time spend watching TV about the election, and interest in the election
**** Education as moderator

***FEELING THERMOMETERS
** Traits moderated by education
xtreg Feel c.Competence##c.education c.Warmth##c.education c.Leadership##c.education c.Integrity##c.education i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004, fe

***VOTE CHOICE
** Traits moderated by education
xtlogit vote c.Competence##c.education c.Warmth##c.education c.Leadership##c.education c.Integrity##c.education i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004, fe


**** TV watching as moderator

***FEELING THERMOMETERS
** Traits moderated by TV watching of election
xtreg Feel c.Competence##c.TVwatch  c.Warmth##c.TVwatch c.Leadership##c.TVwatch  c.Integrity##c.TVwatch  i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004, fe

***VOTE CHOICE
** Traits moderated by TV watching of election
xtlogit vote c.Competence##c.TVwatch c.Warmth##c.TVwatch c.Leadership##c.TVwatch c.Integrity##c.TVwatch i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004, fe


**** Interest in election as moderator
***FEELING THERMOMETERS

** Traits moderated by interest in the election
xtreg Feel c.Competence##c.interest c.Warmth##c.interest c.Leadership##c.interest c.Integrity##c.interest i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004, fe

***VOTE CHOICE
** Traits moderated by interest in the election
xtlogit vote c.Competence##c.interest c.Warmth##c.interest c.Leadership##c.interest c.Integrity##c.interest i.cand_party##c.party7 i.cand_party##ib(2008).VCF0004, fe
